/**
 * 
 */
package com.bstek.code.model;

import java.io.Serializable;

/**
 * @description 用于生成datatree的模板信息
 * @author zhangkun
 * @date 2020年6月1日
 *
 */
public class DataTreeInfo implements Serializable {
	private static final long serialVersionUID = 1L;
	
	private TableInfo tab;// 表信息

	private String packageName;// 包名

	private String domainName;// packageName.javaBean

	private String javaBean;// tableName对应的javaBean

	private String controllerName;// bo类名

	private String daoName;// dao类名

	private String serviceName;// dao类名

	private String prBeanId;// beanid 前缀

	private String daoBeanId;// dao beanid

	private String controllerBeanId;// bo beanid

	private String serviceBeanId;// service beanid
	
	private String parentId; // 父节点ID
	
	private String masterId; //主键ID
	
	private String displayCol; //显示列

	public DataTreeInfo() {

	}

	public DataTreeInfo(String javaBean, String packageName) {
		this.javaBean = javaBean;
		this.packageName = packageName;
		this.daoName = javaBean + "Dao";
		this.controllerName = javaBean + "Controller";
		this.serviceName = javaBean + "Service";
		this.domainName = packageName + ".entity." + javaBean;
	}

	public String getPackageName() {
		return packageName;
	}

	public void setPackageName(String packageName) {
		this.packageName = packageName;
	}

	public String getJavaBean() {
		return javaBean;
	}

	public void setJavaBean(String javaBean) {
		this.javaBean = javaBean;
	}

	public String getDaoName() {
		return daoName;
	}

	public void setDaoName(String daoName) {
		this.daoName = daoName;
	}

	public String getDomainName() {
		return domainName;
	}

	public void setDomainName(String domainName) {
		this.domainName = domainName;
	}

	public TableInfo getTab() {
		return tab;
	}

	public void setTab(TableInfo tab) {
		this.tab = tab;
	}

	public String getPrBeanId() {
		return prBeanId;
	}

	public void setPrBeanId(String prBeanId) {
		this.prBeanId = prBeanId;
	}

	public String getDaoBeanId() {
		return daoBeanId;
	}

	public void setDaoBeanId(String daoBeanId) {
		this.daoBeanId = daoBeanId;
	}

	public String getControllerName() {
		return controllerName;
	}

	public void setControllerName(String controllerName) {
		this.controllerName = controllerName;
	}

	public String getServiceName() {
		return serviceName;
	}

	public void setServiceName(String serviceName) {
		this.serviceName = serviceName;
	}

	public String getControllerBeanId() {
		return controllerBeanId;
	}

	public void setControllerBeanId(String controllerBeanId) {
		this.controllerBeanId = controllerBeanId;
	}

	public String getServiceBeanId() {
		return serviceBeanId;
	}

	public void setServiceBeanId(String serviceBeanId) {
		this.serviceBeanId = serviceBeanId;
	}
	
	

	/**
	 * @return the parentId
	 */
	public String getParentId() {
		return parentId;
	}

	/**
	 * @param parentId the parentId to set
	 */
	public void setParentId(String parentId) {
		this.parentId = parentId;
	}

	/**
	 * @return the masterId
	 */
	public String getMasterId() {
		return masterId;
	}

	/**
	 * @param masterId the masterId to set
	 */
	public void setMasterId(String masterId) {
		this.masterId = masterId;
	}

	/**
	 * @return the displayCol
	 */
	public String getDisplayCol() {
		return displayCol;
	}

	/**
	 * @param displayCol the displayCol to set
	 */
	public void setDisplayCol(String displayCol) {
		this.displayCol = displayCol;
	}

	/**
	 * 首字母大写
	 * 
	 * @author hans
	 * @createDate 2017年6月16日
	 * @param str
	 * @return
	 */
	public String firstUpper(String str) {
		return str.substring(0, 1).toUpperCase() + str.substring(1, str.length() - 1).toLowerCase();
	}

}
